<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path;
%>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>登录/注册</title>
    <link href='https://fonts.googleapis.com/css?family=Titillium+Web:400,300,600' rel='stylesheet' type='text/css'>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
    <link rel="stylesheet" href="<%=path%>/css/style.css">
    <script>
        function saveid() {
            var id=document.getElementById('userid2');
            sessionStorage.setItem('userid',id.value);
        }
    </script>

</head>

<body>
<div class="form">
    <ul class="tab-group">
        <li class="tab active"><a href="#login">登录</a></li>
        <li class="tab "><a href="#signup">注册</a></li>
    </ul>

    <div class="tab-content">

        <div id="login">
            <h1>用户登录</h1>
            <form action="/login.html" method="post">

            <div class="field-wrap">
                <label>
                    请输入用户名<span class="req">*</span>
                </label>
                <input type="text" id="userid2" name="userid" required autocomplete="off" />
            </div>

            <div class="field-wrap">
                <label>
                    请输入密码<span class="req">*</span>
                </label>
                <input type="password" name="password" required autocomplete="off" />
            </div>
            <h3 >${signal}</h3>
            <button class="button button-block" onclick="saveid()"/>登录</button>


        </form>
    </div>

        <div id="signup">
            <h1>用户注册</h1>
            <form action="/reg.html" method="post">
                <div class="top-row">
                    <div class="field-wrap">
                        <label>
                            姓名<span class="req">*</span>
                        </label>
                        <input type="text" name="username" required autocomplete="off" />
                    </div>

                    <div class="field-wrap">
                        <select  name="address">
                            <option value="">请选择</option><br>
                            <optgroup label="北苑">
                                <option value="北苑一号公寓楼">北苑一号公寓楼</option><br>
                                <option value="北苑二号公寓楼">北苑二号公寓楼</option><br>
                                <option value="北苑三号公寓楼">北苑三号公寓楼</option><br>
                                <option value="北苑四号公寓楼">北苑四号公寓楼</option><br>
                                <option value="北苑五号公寓楼">北苑五号公寓楼</option><br>
                                <option value="北苑六号公寓楼">北苑六号公寓楼</option><br>
                                <option value="北苑七号公寓楼">北苑七号公寓楼</option><br>
                            </optgroup>
                            <optgroup label="南苑">
                                <option value="南苑一号公寓楼">南苑一号公寓楼</option><br>
                                <option value="南苑二号公寓楼">南苑二号公寓楼</option><br>
                                <option value="南苑三号公寓楼">南苑三号公寓楼</option><br>
                                <option value="南苑四号公寓楼">南苑四号公寓楼</option><br>
                                <option value="南苑五号公寓楼">南苑五号公寓楼</option><br>
                                <option value="南苑六号公寓楼">南苑六号公寓楼</option><br>
                                <option value="南苑七号公寓楼">南苑七号公寓楼</option><br>
                                <option value="南苑八号公寓楼">南苑八号公寓楼</option><br>
                                <option value="南苑九号公寓楼">南苑九号公寓楼</option><br>
                                <option value="南苑十号公寓楼">南苑十号公寓楼</option><br>
                                <option value="南苑十一公寓楼">南苑十一公寓楼</option><br>
                                <option value="南苑十二公寓楼">南苑十二公寓楼</option><br>
                            </optgroup>
                        </select>
                    </div>
                </div>

                <div class="field-wrap">
                    <label>
                        用户名<span class="req">*</span>
                    </label>
                    <input type="text" name="userid" required autocomplete="off"  />
                </div>

                <div class="field-wrap">
                    <label>
                        密码<span class="req">*</span>
                    </label>
                    <input type="password" name="password" required autocomplete="off" />
                </div>
                <div class="field-wrap">
                    <label>
                        手机号<span class="req">*</span>
                    </label>
                    <input type="text" name="phonenumber" required autocomplete="off" />
                </div>
                <h3 >${signal}</h3>
                <button type="submit" class="button button-block" />注册</button>


            </form>

        </div>



    </div><!-- tab-content -->
</div> <!-- /form -->

<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src="<%=path%>/js/index.js"></script>
</body>
</html>
